home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Microsoft Plateform / Visual Basic 5.0 / Msvb50.ace / msvb50 / MSVB50 / VB / REPOSTRY / INCLUDE / REPERR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-03  |  6.8 KB  |  112 lines

  1. //*****************************************************************************
  2. // REPERR.H
  3. //
  4. // This file contains the errors that any Repository method may return.  Each
  5. // error has rich error text that can be retrieved using the Repository error
  6. // queue.  See the documentation for more details.
  7. //
  8. // Copyright (c) 1995-1996 by Microsoft Corporation, All Rights Reserved
  9. //*****************************************************************************
  10. #ifndef __REPERR_H__
  11. #define __REPERR_H__
  12.  
  13. #ifndef EMAKEHR
  14. #define SMAKEHR(val)            MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, val)
  15. #define EMAKEHR(val)            MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, val)
  16. #endif
  17.  
  18. //**** Generic errors.
  19. #define EREP_BADPARAMS            EMAKEHR(0x1000)        // One or more parameters were invalid.
  20. #define EREP_BADNAME            EMAKEHR(0x1001)        // Name has a syntax error or is reserved.
  21. #define EREP_BADDRIVER            EMAKEHR(0x1002)        // ODBC driver is too old.
  22. #define EREP_BADERROR            EMAKEHR(0x1003)        // Internal error (%s: %d).
  23. #define EREP_BUFFER_OVERFLOW    EMAKEHR(0x1004)        // An error occured while building an SQL statement.  
  24.                                                     // Please reduce the amount of changed properties or other Repository objects in the operation (%s: %d).
  25.  
  26. //**** ODBC errors 
  27. #define EREP_NOROWSFOUND        EMAKEHR(0x1011)        // No data was found for the statement.
  28. #define EREP_ODBC_CERROR        EMAKEHR(0x1012)        // Generic ODBC error.
  29. #define EREP_ODBC_MDBNOTFOUND    EMAKEHR(0x1013)        // .mdb file doesn't exist.
  30. #define EREP_NEED_DATA            EMAKEHR(0x1014)        // the statement needs data at run-time.
  31. #define EREP_ODBC_UNKNOWNDRIVER    EMAKEHR(0x1015)        // Unknown driver type.
  32. #define EREP_ODBC_CREATEFAILED    EMAKEHR(0x1016)        // Create of .mdb file failed.
  33. #define EREP_ODBC_WARNINGS        SMAKEHR(0x1017)        // Warnings were issued by ODBC driver.  Check the
  34.                                                     //    error queue for the error text.
  35.  
  36. //**** Database errors
  37. #define    EREP_DB_EXISTS            EMAKEHR(0x1030)        // the database already exists
  38. #define EREP_DB_NOTCONNECTED    EMAKEHR(0x1031)        // Must be connected before doing this operation.
  39. #define EREP_DB_ALREADYCONNECTED EMAKEHR(0x1032)    // Database already connected.
  40. #define EREP_DB_DBMSONETHREAD    EMAKEHR(0x1033)        // The database is single threaded.
  41. #define EREP_DB_CORRUPT            EMAKEHR(0x1034)        // The database has consistancy errors.
  42. #define EREP_DB_NOSCHEMA        EMAKEHR(0x1035)        // The repository schema is not installed.
  43. #define EREP_DB_DBMSOLD            EMAKEHR(0x1036)        // DBMS is too old for the Repository.
  44. #define EREP_DB_READONLY        EMAKEHR(0x1037)        // DBMS is read only and cannot be changed.
  45.  
  46. //**** Transaction errors
  47. #define EREP_TXN_NOTXNACTIVE    EMAKEHR(0x1041)        // Cannot Commit/Abort when no transaction active.
  48. #define EREP_TXN_AUTOABORT        EMAKEHR(0x1042)        // User started transaction wasn't committed or
  49.                                                     //   rolled back before final shutdown.
  50. #define EREP_TXN_TOOMANY        EMAKEHR(0x1043)        // Too many transactions running.
  51. #define EREP_TXN_TIMEOUT        EMAKEHR(0x1044)        // Operation timed out.
  52. #define EREP_TXN_NODATA            EMAKEHR(0x1045)        // There is no data for the option.
  53. #define EREP_TXN_NOSETINTXN        EMAKEHR(0x1046)        // Can't set options while in txn.
  54. #define EREP_TXN_OBJABORTED        EMAKEHR(0x1047)        // Object was valid but has been aborted or deleted. (IntID:%s).
  55. #define EREP_TXN_COLABORTED        EMAKEHR(0x1048)        // Collection was valid but has been aborted or deleted.
  56.  
  57. //**** Repository level errors.
  58. #define EREP_REPOS_CACHEFULL    EMAKEHR(0x1070)        // The cache is full.
  59. #define EREP_REPOS_NONEXTDISPID    EMAKEHR(0x1071)        // No available dispid value left.
  60.  
  61. //**** Relationship errors.
  62. #define EREP_RELSHIP_EXISTS        EMAKEHR(0x1100)        // The relationship already exists.
  63. #define EREP_RELSHIP_INVALID_PAIR EMAKEHR(0x1101)    // the relship doesn't have a valid role pair
  64. #define EREP_RELSHIP_NOTFOUND    EMAKEHR(0x1102)        // Relship wasn't found.
  65.                                                     //  with an existing one.  Dupe name for example.
  66. #define EREP_RELSHIP_ORGONLY    EMAKEHR(0x1105)        // Cannot update a sequenced relationship collection
  67.                                                     //  from the target.
  68. #define EREP_RELSHIP_OUTOFDATE    EMAKEHR(0x1106)        // The collection is out of date compared to the DBMS.
  69. #define EREP_RELSHIP_INVALIDFLAGS EMAKEHR(0x1107)    // The combination of role flags is invalid.
  70. #define EREP_RELSHIP_NAMEINVALID EMAKEHR(0x1108)    // The name is wrong.  This could be NULL or empty
  71.                                                     //   string in the case where names are unique (required).
  72. #define EREP_RELSHIP_DUPENAME    EMAKEHR(0x1109)        // The name is already being used.
  73.  
  74. //**** Class Type errors
  75. #define EREP_TYPE_TABLEMISMATCH    EMAKEHR(0x1120)        // Table exists, but no IntID field.
  76. #define EREP_TYPE_COLMISMATCH    EMAKEHR(0x1121)        // Class specific column type alter mismatch.
  77. #define EREP_TYPE_NOTNULLABLE    EMAKEHR(0x1122)        // The column is not nullable.   
  78. #define EREP_TYPE_MULTIDEFIFACES EMAKEHR(0x1123)    // More than one default interface on a class.
  79. #define EREP_TYPE_INVERTEDNOTALLOWED EMAKEHR(0x1124)// Inverted properties not allowed on this iface.
  80. #define EREP_TYPE_INVALIDSCALE    EMAKEHR(0x1125)        // Invalid SQL scale.
  81.  
  82. //**** Lock errors
  83. #define EREP_LOCK_TIMEOUT        EMAKEHR(0x1200)        // Lock timed out.
  84.  
  85. //**** Query errors
  86. #define EREP_QRY_BADCOLUMNS        EMAKEHR(0x1250)        // Ad-hoc query missing IntID column, has too many columns,
  87.                                                     //   or is otherwise unsuitable for execution.
  88.  
  89. //**** Object errors
  90. #define EREP_OBJ_NOTINITIALIZED    EMAKEHR(0x1300)        // Object not initialized.
  91. #define EREP_OBJ_NOTFOUND        EMAKEHR(0x1301)        // Object not found.
  92. #define EREP_OBJ_NONAMINGRELSHIP EMAKEHR(0x1302)    // No naming relationships.
  93. #define EREP_OBJ_EXISTS            EMAKEHR(0x1303)        // Object already exists.
  94.  
  95. //**** Property errors.
  96. #define EREP_PROP_MISMATCH        EMAKEHR(0x1400)        // Data type mismatch, for example setting annotational 
  97.                                                     //  props with other than string data type.
  98. #define EREP_PROP_SETINVALID    EMAKEHR(0x1401)        // Cannot set collections.
  99. #define SREP_PROP_TRUNCATION    SMAKEHR(0x1402)        // Property column is not big enough to hold the data.
  100. #define EREP_PROP_CANTSETREPTIM    EMAKEHR(0x1403)        // Can't set property on repository TIM objects.
  101. #define EREP_PROP_READONLY        EMAKEHR(0x1404)        // Property is read only.
  102. #define EREP_PROP_NOTEXISTS        EMAKEHR(0x1405)        // Property does not exist.
  103.  
  104. //**** TIM errors.
  105. #define EREP_TIM_INVALIDFLAGS   EMAKEHR(0x1500)        // Invalid Combination of Collection Flags.
  106. #define    EREP_TIM_FLAGSDEST        EMAKEHR(0x1501)        // Collection Flags cannot be set of Destination Collection.
  107. #define EREP_TIM_RELTYPEINVALID EMAKEHR(0x1502)        // The type of a Relationship Definition object for a collection is wrong.
  108. #define EREP_TIM_CTYPEINVALID    EMAKEHR(0x1503)        // Invalid Ctype chosen for property.
  109. #define EREP_TIM_TOOMANYCOLS    EMAKEHR(0x1504)        // Too many Collections per RelationshipDef Object (One origin (Dest.) per Relship).
  110. #define EREP_TIM_SQLTYPEINVALID    EMAKEHR(0x1505)        // Invalid SQL type chosen for property.
  111. #endif // __REPERR_H__
  112.